package com.hhl;

import com.hhl.service.UserService;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.hhl")
public class TestApplication {

	public static void main(String[] args) {
		System.out.println("Hello world!");

		BeanFactory beanFactory = new AnnotationConfigApplicationContext(TestApplication.class);
		UserService userService =  beanFactory.getBean(UserService.class);

		userService.test();

		System.out.println(1);
	}
}